package cn.iocoder.yudao.module.mqtt.controller.admin.devicelatestlog.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 数据上传 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DeviceLatestLogRespVO {

    @Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13642")
    @ExcelProperty("设备ID")
    private Long id;

    @Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6888")
    @ExcelProperty("设备ID")
    private Long deviceId;

    @Schema(description = "设备名称", example = "王五")
    @ExcelProperty("设备名称")
    private String deviceName;

    @Schema(description = "设备唯一码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("设备唯一码")
    private String deviceKey;

    @Schema(description = "网关ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11755")
    @ExcelProperty("网关ID")
    private String gatewayId;

    @Schema(description = "类型", example = "2")
    @ExcelProperty(value = "类型", converter = DictConvert.class)
    @DictFormat("mqtt_data_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String requestType;

    @Schema(description = "发送包内容")
    @ExcelProperty("发送包内容")
    private String requestBody;

    @Schema(description = "响应包内容")
    @ExcelProperty("响应包内容")
    private String responseBody;

    @Schema(description = "上送状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "上送状态", converter = DictConvert.class)
    @DictFormat("mqtt_device_istrue") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String sendStatus;

    @Schema(description = "上送成功", example = "2")
    @ExcelProperty(value = "上送成功", converter = DictConvert.class)
    @DictFormat("mqtt_device_istrue") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String responseStatus;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;


    private String lisDay;//日产流量
    private String lisAll;//全部流量
    private String lisYear; //年产水量
    private LocalDateTime lisTime; //时间
    private String listMonth; //月产水量

    private String lisSun; //产水流量
    private String lisSunAll;//产水累积量
    private LocalDateTime lisSunTime; //产水时间
}